package cn.wanho.dao;

import cn.hutool.core.date.DateTime;
import cn.wanho.dto.CmsScore;
import cn.wanho.rvo.ScoreVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * @Author: FXP
 * @Date: 2022/08/04/9:48
 * @Description: 
 */
@Mapper
public interface CmsScoreMapper {
    /**
     * 添加成绩
     * @param record the record
     * @return insert count
     */
    int insert(CmsScore record);

    /**
     * delete by primary key
     * @param id primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * insert record to table selective
     * @param record the record
     * @return insert count
     */
    int insertSelective(CmsScore record);

    /**
     * select by primary key
     * @param id primary key
     * @return object by primary key
     */
    CmsScore selectByPrimaryKey(Integer id);

    /**
     * update record selective
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(CmsScore record);

    /**
     * update record
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(CmsScore record);

    /**
     * 查看所有学生成绩（不判断是否授课完结）
     */
    List<ScoreVO> selectStudentGrade(@Param(value = "classId") Integer classId,
                                     @Param(value = "stageId") Integer stageId,
                                     @Param(value = "teacherId") Integer teacherId,
                                     @Param(value = "studentName") String studentName,
                                     @Param(value = "stageNum") Integer stageNum);
}